<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Nordic Thingy:52 v2.2.0 : Accelerometer</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/>
<link href="nordic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%" class="blank">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nordic Thingy:52 v2.2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
<script>
var url=window.location.href.split("/").reverse()[1];
var validLinks= ["nrf5","s130","s132","s212","s332"];
var index;
for (index = 0; index < validLinks.length; ++index) {
   if ( url.indexOf(validLinks[index]) !== -1 ) {
      document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected');
   };
};
</script>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__driver__acc.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Accelerometer<div class="ingroups"><a class="el" href="group__drivers.html">Drivers</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Low power accelerometer driver API.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__lis3dh__acc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lis3dh__acc.html">LIS3DH accelerometer</a></td></tr>
<tr class="memdesc:group__lis3dh__acc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Definitions of LIS3DH constants. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdrv__acc__cfg__t.html">drv_acc_cfg_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">LIS3DH accelerometer configuration struct.  <a href="structdrv__acc__cfg__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group__driver__acc.html#gga06fc87d81c62e9abb8790b6e5713c55ba0800e3067c9d30e558e763519f544bb3">DRV_ACC_STATUS_CODE_SUCCESS</a>, 
<a class="el" href="group__driver__acc.html#gga06fc87d81c62e9abb8790b6e5713c55ba664c89f731b4f580b7380b6d5be3f4fc">DRV_ACC_STATUS_CODE_INVALID_PARAM</a>, 
<a class="el" href="group__driver__acc.html#gga06fc87d81c62e9abb8790b6e5713c55ba0a9b3beccfcb7883a57f0f2f48f5d6ad">DRV_ACC_STATUS_WRONG_DEVICE</a>, 
<a class="el" href="group__driver__acc.html#gga06fc87d81c62e9abb8790b6e5713c55baf5addf172cec0fc97703e8aea3089c6f">DRV_ACC_STATUS_UNINITALIZED</a>
 }<tr class="memdesc:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return status codes.  <a href="group__driver__acc.html#ga06fc87d81c62e9abb8790b6e5713c55b">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0e685f4a1e94aa18eb707bf4431cb2ab"><td class="memItemLeft" align="right" valign="top">ret_code_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__acc.html#ga0e685f4a1e94aa18eb707bf4431cb2ab">drv_acc_init</a> (<a class="el" href="structdrv__acc__cfg__t.html">drv_acc_cfg_t</a> const *const p_cfg)</td></tr>
<tr class="memdesc:ga0e685f4a1e94aa18eb707bf4431cb2ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for initializing the accelerometer driver.  <a href="#ga0e685f4a1e94aa18eb707bf4431cb2ab">More...</a><br /></td></tr>
<tr class="separator:ga0e685f4a1e94aa18eb707bf4431cb2ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9d23454f637d34f7fae231892cc36397"><td class="memItemLeft" align="right" valign="top">ret_code_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__acc.html#ga9d23454f637d34f7fae231892cc36397">drv_acc_wakeup_prepare</a> (bool p_wakeup)</td></tr>
<tr class="memdesc:ga9d23454f637d34f7fae231892cc36397"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for preparing for sleep and subsequent wakeup.  <a href="#ga9d23454f637d34f7fae231892cc36397">More...</a><br /></td></tr>
<tr class="separator:ga9d23454f637d34f7fae231892cc36397"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Low power accelerometer driver API. </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga06fc87d81c62e9abb8790b6e5713c55b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga06fc87d81c62e9abb8790b6e5713c55b">&#9670;&nbsp;</a></span>anonymous enum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return status codes. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga06fc87d81c62e9abb8790b6e5713c55ba0800e3067c9d30e558e763519f544bb3"></a>DRV_ACC_STATUS_CODE_SUCCESS&#160;</td><td class="fielddoc"><p>Successful. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga06fc87d81c62e9abb8790b6e5713c55ba664c89f731b4f580b7380b6d5be3f4fc"></a>DRV_ACC_STATUS_CODE_INVALID_PARAM&#160;</td><td class="fielddoc"><p>Invalid parameters. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga06fc87d81c62e9abb8790b6e5713c55ba0a9b3beccfcb7883a57f0f2f48f5d6ad"></a>DRV_ACC_STATUS_WRONG_DEVICE&#160;</td><td class="fielddoc"><p>Wrong device at I2C (TWI) address. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga06fc87d81c62e9abb8790b6e5713c55baf5addf172cec0fc97703e8aea3089c6f"></a>DRV_ACC_STATUS_UNINITALIZED&#160;</td><td class="fielddoc"><p>The driver is unitialized, please initialize. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0e685f4a1e94aa18eb707bf4431cb2ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0e685f4a1e94aa18eb707bf4431cb2ab">&#9670;&nbsp;</a></span>drv_acc_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_code_t drv_acc_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdrv__acc__cfg__t.html">drv_acc_cfg_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_cfg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for initializing the accelerometer driver. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_cfg</td><td>Initialization struct.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">DRV_ACC_STATUS_CODE_SUCCESS</td><td></td></tr>
    <tr><td class="paramname">DRV_ACC_STATUS_WRONG_DEVICE</td><td></td></tr>
    <tr><td class="paramname">NRF_ERROR_NULL</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Other codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga9d23454f637d34f7fae231892cc36397"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9d23454f637d34f7fae231892cc36397">&#9670;&nbsp;</a></span>drv_acc_wakeup_prepare()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_code_t drv_acc_wakeup_prepare </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>p_wakeup</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for preparing for sleep and subsequent wakeup. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_wakeup</td><td>If false, go to deepest sleep and do not prepare to wake up the system.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>When the nRF prepares for sleep, the LIS3DH will wake up.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">DRV_ACC_STATUS_CODE_SUCCESS</td><td></td></tr>
    <tr><td class="paramname">DRV_ACC_STATUS_CODE_INVALID_PARAM</td><td></td></tr>
    <tr><td class="paramname">DRV_ACC_STATUS_UNINITALIZED</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Other codes from the underlying drivers. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="topicfooter">
<a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/>
<script>
var date = new Date("Thu Feb 7 2019" + " UTC");
document.getElementById("date").innerHTML = date.toJSON().slice(0, 10);
var url=window.location.href.split("?")[0];
var filename=url.substring(url.lastIndexOf('/')+1);
document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename);
</script>
</div>
</body>
</html>
